<!DOCTYPE html>
<html>
<head>
    <title>添加系统权限</title>
   <#include "/common/import.ftl" >
    <script type="text/javascript">
        $(function () {
            $('#inputForm').form({
                url: '${ctx}/uct/sys/save.action',
                onSubmit: function () {
                    return $("#inputForm").form("validate");
                },
                success: function (data) {
                    var result = jQuery.parseJSON(data);
                    if (result.flag == 'T') {
                        $.messager.alert('提交结果', '操作成功', 'info', function () {
                            parent.closeAddWin();
                        });
                        parent.reload();
                    } else {
                        $.messager.alert('提交结果', result.msg, 'info');
                    }
                }
            });

            //修改时 系统标识为readOnly
            <#if item.sysId??>
                 $("#sysEname").attr("readOnly", true);
            </#if>
        });
    </script>
</head>
<body>
<div id="tip">
    <form id="inputForm" name="inputForm" method="post" action="${ctx}/uct/sys/save.action">
        <input type="hidden" name="formToken" id="formToken" value="${formToken!''}">
        <input type="hidden" name="sysId" id="sysId" value="${item.sysId!''}"/>
        <table class="datagrid-body">
            <tr>
                <td class="datagrid-header">中文名称<span style="color:red;">*</span></td>
                <td>
                    <input name="sysCname" id="sysCname" value="${item.sysCname!''}"
                           class="easyui-validatebox"
                           data-options="required:true,validType:'length[1,50]'" size="50"
                           missingMessage="请输入名称" invalidMessage="应为1~50个字"/>
                </td>
            </tr>

            <tr>
                <td class="datagrid-header">英文标识<span style="color:red;">*</span></td>
                <td>
                    <input name="sysEname" id="sysEname" value="${item.sysEname!''}"
                           class="easyui-validatebox"
                           data-options="required:true,validType:'length[1,50]'" size="50"
                           missingMessage="请输入英文标识" invalidMessage="应为1~50个英文字母"/>
                </td>
            </tr>
            <tr>
                <td class="datagrid-header">系统域名<span style="color:red;">*</span></td>
                <td>
                    <input name="delStatus" id="delStatus" value="${item.delStatus!''}"
                           class="easyui-validatebox"
                           data-options="required:true,validType:'length[1,80]'" size="50"
                           missingMessage="请输入系统域名" invalidMessage="应为1~80个英文字母"/>
                </td>
            </tr>
            <tr>
                <td class="datagrid-header">排序值<span style="color:red;">*</span></td>
                <td>
                    <input id="orderNum" name="orderNum" value="${item.orderNum!''}"
                           class="easyui-numberbox"
                           data-options="required:true,validType:'length[1,50]'" size="10"
                           missingMessage="请输入排序值" invalidMessage="应为1~10个数字"/>
                </td>
            </tr>

            <tr>
                <td class="datagrid-header"></td>
                <td>
                    <a href="#" class="easyui-linkbutton" iconCls="icon-save"
                       onClick="$('#inputForm').submit();">提交</a>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>

